﻿namespace MEF_Test.Contracts
{
    /// <summary>
    /// The contract for a SettingsManager
    /// </summary>
    /// <remarks>In order to select an <see cref="ISettingsManager"/> instance as the current Settings Manager, a Contract To Type Mapping must map the contract name MEF_test.Contracts.ISettingsManager to the fully qualified type name to use as the actual implementation. ex : MEF_Test.SettingsManager.MydraSettingsManager.</remarks>    
    public interface ISettingsManager
    {
        /// <summary>
        /// Gets the setting matching the provided setting string identifier.
        /// </summary>
        /// <typeparam name="T">The type of the setting value.</typeparam>
        /// <param name="settingStringIdentifier">The setting string identifier.</param>
        /// <returns>The value for the specified setting</returns>
        T GetSetting<T>(string settingStringIdentifier);

        /// <summary>
        /// Sets the setting.
        /// </summary>
        /// <typeparam name="T">The type of the setting value.</typeparam>
        /// <param name="settingStringIdentifier">The setting string identifier.</param>
        /// <param name="value">The value of the setting to store.</param>
        void SetSetting<T>(string settingStringIdentifier, T value);
    }
}